<?php

namespace App\Models\CarModels;

use App\Models\SystemManagement\Department;
use App\Models\SystemManagement\Employee;
use Illuminate\Database\Eloquent\Model;
class CarCheckRecord extends Model
{
    //

    protected $table = 'car_check_records';
    protected $fillable = ['car_id','odds','handles','department_id','record_id','desc','process'];

    public function car(){
        return $this->belongsTo(CarInfo::class,'car_id','id')->with('kind');
    }

    public function record(){
        return $this->belongsTo(Employee::class,'record_id','id');
    }
    public function department(){
        return $this->belongsTo(Department::class,'department_id','id');
    }

    public function process()
    {
        return $this->belongsTo(CarCheckRecordProcess::class,'process');
    }
}
